}
action = g_new0 (GtkWidgetAction, 1);
+ action->owner = G_TYPE_FROM_CLASS (widget_class);
action->name = g_strdup (action_name);
action->activate = activate;
action->parameter_type = parameter_type ? g_variant_type_new (parameter_type) : NULL;
* gtk_widget_class_query_action:
* @widget_class: a #GtkWidgetClass
* @index_: position of the action to query
+ * @owner: the type where the action was defined
* @action_name: return location for the action name
* @parameter_type: return location for the parameter type
* @state_type: return location for the state type
* a widget class using gtk_widget_class_install_action()
* during class initialization.
*
+ * Note that this function will also return actions defined
+ * by parent classes. You can identify those by looking
+ * at @owner.
+ *
* Returns: %TRUE if the action was found,
* %FALSE if @index_ is out of range
*/
gboolean
gtk_widget_class_query_action (GtkWidgetClass *widget_class,
guint index_,
+ GType *owner,
const char **action_name,
const GVariantType **parameter_type,
const GVariantType **state_type)
{
GtkWidgetAction *action = g_ptr_array_index (priv->actions, index_);
+ *owner = action->owner;
*action_name = action->name;
*parameter_type = action->parameter_type;
*state_type = action->state_type;
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_class_query_action (GtkWidgetClass *widget_class,
guint index_,
+ GType *owner,
const char **action_name,
const GVariantType **parameter_type,
const GVariantType **state_type);